import request from '/@/request/https'
import { AxiosPromise } from 'axios'

// 验证码
export function createNumericCaptchaImage(): AxiosPromise {
    return request({
        url:"/ytb/mobile/createNumericCaptchaImage",
        method: 'get',
    })
}
// 投保列表
export function insuranceList(params): AxiosPromise {
    return request({
        url:"/ytb/insurance/list",
        method: 'get',
        params
    })
}
// 投保详细
export function insurance(params): AxiosPromise {
    return request({
        url:"/ytb/insurance",
        method: 'get',
        params
    })
}
// 投保下拉
export function systemList(dictType): AxiosPromise {
    return request({
        url:`/system/dict/data/type/${dictType}`,
        method: 'get',
    })
}
// 保司电话
export function getCompanyPhoneList(dictType): AxiosPromise {
    return request({
        url:"/ytb/mobile/getCompanyPhoneList",
        method: 'get',
    })
}
// 图片OCR识别
export function recognizeOcr(data): AxiosPromise {
    return request({
        url:"/ocr-api/recognize",
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        method: 'post',
        data
    })
}
// 图片上传
export function ytbUpload(data): AxiosPromise {
    return request({
        url:"/ytb/upload",
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        method: 'post',
        data
    })
}
// 承保公司
export function companyList(params): AxiosPromise {
    return request({
        url:"/ytb/responsibility/companyList",
        method: 'get',
        params
    })
}
// 匹配保险公司
export function autoMatchInsurer(data): AxiosPromise {
    return request({
        url:"/ytb/randomRecord/autoMatchInsurer",
        method: 'post',
        data
    })
}
// 放弃投保
export function insAbandon(data): AxiosPromise {
    return request({
        url:"/ytb/dispatch/insAbandon",
        method: 'post',
        data
    })
}
// 移动端登陆
export function ytblogin(data): AxiosPromise {
    return request({
        url:"/ytb/mobile/login",
        method: 'post',
        data
    })
}
// 短信验证码
export function sendSMS(params): AxiosPromise {
    return request({
        url:"/sms-api/sendSMS",
        method: 'get',
        params
    })
}
// 注册
export function register(data): AxiosPromise {
    return request({
        url:"/ytb/mobile/register",
        method: 'post',
        data
    })
}
// 重置
export function resetPassword(data): AxiosPromise {
    return request({
        url:"/ytb/mobile/resetPassword",
        method: 'post',
        data
    })
}